[Data Science Tool Box] 6일차 실습
실습68: 100MB 충돌
-
100MB가 넘는 파일을 upload할 경우 생기는 충돌 재현
git clone https://github.com/guebin/dinner.git # 각자 레포를 만들고 클론할것
cd dinner # 클론한 repo로 이동
git config credential.helper store # git 등록
wget https://media.githubusercontent.com/media/guebin/PP2023/main/posts/fashion-mnist_train.csv # 100MB넘는 csv다운로드
git add .
git commit -m .
git push
#여기서 1차당황
-
삭제후 다시 push
rm fashion-mnist_train.csv
git add .
git commit -m .
git push
# 여기서 2차당황
- 무야! 지워졌는데 왜 그랭!! 지난번ㅇ ㅔ 이미 오류난거,, `git log1 쳐보면 안된거부터 해버려서 ..!?
-
해결책? local에서 깃폴더삭제하고 다시 clone
cp ~/dinner2/README.md . -f
:홈 디렉토리의 dinner2에 있는 README파일을 copy해! 현재(.)폴더로 -f:이름 같은건 걍 붙여넣어
실습69: git ignore
-
다시 아래의 상황을 만듦.
git clone https://github.com/guebin/dinner.git # 각자 레포를 만들고 클론할것
cd dinner # 클론한 repo로 이동
git config credential.helper store # git 등록
wget https://media.githubusercontent.com/media/guebin/PP2023/main/posts/fashion-mnist_train.csv # 100MB넘는 csv다운로드
-
.gitignore
파일 생성 : upload무시해!
~/dinner/.gitignore
*csv
-
아래를 시도
git add .
git commit -m .
git push
-
하위폴더도 영향받음을 확인
- data라는 폴더를 생성
- fashion-mnist_train.csv 를 data 폴더로 이동
ls data > ./data/data_list.txt
실행 (무슨뜻?)- github으로 push
실습70: 블로그 제목이 update 되지 않을때
실습71: dinner를 codespace로 만들기
실습72: revert
vs reset
vi a.txt
git add .
git commit -m "make a"
vi a.txt
git add .
git commit -m "make line2" # 3, 4, 5 만들어 보자
git log
line 3으로 이동!
그 이후에 한 건 안보이네? 그럼 밑에 내용..
-
git reflog
- git reflog 하면 line 4 ,5 뒤에것도 다 나왕
실습73: 한꺼풀씩 revert
git revert ~
실습74: revert
, reset
이 가능한 이유?
git에서 된다이
revert와 reset의 근본적인 차이?
실습75: git과 github의 차이점
- 여러 시점을 넘나드는 느낌? —–> git
git clone
git init
하면 git 이 생긴당
실습76: git branch
평행우쥬,,,
실습77: merge
와 rebase
의 차이점
- 나누어진 branch를 합치자!
git rebase yeon
한것! 짜장면 냠이 뭔가 이상해짐!!
git rebase boram
rebase : 붙이고 붙이고.. 뭔가 순서 같은게 튀기고 튀기고..
merge: 작업했던 순서가 바뀌지 않는다. 작업한 태그가 유지되어있음.. 단점 지저분해 보임
main branch는 merge를 이용해서 합치면 이ㅓㅈㄴ에 했던게 그대로 오고.. 어디 branch에서 했는지 다 기록이 되어있음